package com.mapper;

import com.lagou.Servlet;

import java.util.ArrayList;
import java.util.List;

public final class Mapper {

    private List<MappedHost> mappedHosts = new ArrayList<>();

    public static final class MappedHost {

        private String name;

        public List<MappedContext> contexts = new ArrayList<>();

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<MappedContext> getContexts() {
            return contexts;
        }

        public void setContexts(List<MappedContext> contexts) {
            this.contexts = contexts;
        }
    }

    public static final class MappedContext {

        private String name;

        public List<MappedWrapper> exactWrappers = new ArrayList<>();

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<MappedWrapper> getExactWrappers() {
            return exactWrappers;
        }

        public void setExactWrappers(List<MappedWrapper> exactWrappers) {
            this.exactWrappers = exactWrappers;
        }
    }


    public static class MappedWrapper {

        private String url;

        private Servlet servlet;

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public Servlet getServlet() {
            return servlet;
        }

        public void setServlet(Servlet servlet) {
            this.servlet = servlet;
        }
    }

    public List<MappedHost> getMappedHosts() {
        return mappedHosts;
    }

    public void setMappedHosts(List<MappedHost> mappedHosts) {
        this.mappedHosts = mappedHosts;
    }
}
